package com.myhouse.biz.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import com.myhouse.biz.TypeService;
import com.myhouse.dao.TypeDao;
import com.myhouse.entity.Type;
@Controller
public class TypeServiceImpl implements TypeService{
	@Resource
	private TypeDao typeDao;

	@Override
	public void add(Type type) {
		typeDao.add(type);
		
	}

	@Override
	public void delete(int id) {
		typeDao.delete(id);
		
	}

	@Override
	public void update(Type type) {
		typeDao.update(type);
		
	}

	@Override
	public List<Type> getAll() {
		return typeDao.getAll() ;
	}

	@Override
	public Type getTypeByid(int id) {
		
		return typeDao.getTypeByid(id);
	}

	@Override
	public List<Type> getTypeByTitle(String title) {
		
		return typeDao.getTypeByTitle(title);
	}

}
